#import "ZestQuirkController.h"
        
#import "ZestQuirkModel.h"
#import "ZestQuirkCell.h"
#import "Masonry.h"

@interface ZestQuirkController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *charismaKnotTableView;
@property (nonatomic, strong) NSMutableArray *xenialPeacefulYonderModels;

@end

@implementation ZestQuirkController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self thriveSetupview];
	[self blazePathwayElevaterequestData];
}


//: 获取数据模型
- (void)blazePathwayElevaterequestData {
	
}

- (void)thriveSetupview {
    self.charismaKnotTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.charismaKnotTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    self.charismaKnotTableView.estimatedRowHeight = 0;
    self.charismaKnotTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.charismaKnotTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
    self.charismaKnotTableView.delegate = self;
    self.charismaKnotTableView.dataSource = self;
    self.charismaKnotTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    self.charismaKnotTableView.showsVerticalScrollIndicator = NO;
    self.charismaKnotTableView.showsHorizontalScrollIndicator = NO;
    self.charismaKnotTableView.backgroundColor = UIColor.clearColor;
    [self.charismaKnotTableView registerClass:[ZestQuirkCell class] forCellReuseIdentifier:NSStringFromClass([ZestQuirkCell class])];
    [self.view addSubview:self.charismaKnotTableView];
    [self.charismaKnotTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.top.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)xenialPeacefulYonderModels {
	if (!_xenialPeacefulYonderModels) {
		_xenialPeacefulYonderModels = [NSMutableArray array];
	}
	return _xenialPeacefulYonderModels;
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.xenialPeacefulYonderModels.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ZestQuirkCell *swoopIlluminateCrisp = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([ZestQuirkCell class])];
    if (swoopIlluminateCrisp == nil) {
        swoopIlluminateCrisp = [[ZestQuirkCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([ZestQuirkCell class])];
    }
    swoopIlluminateCrisp.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return swoopIlluminateCrisp;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
